package com.Calculator.view.Panel.impl;

import com.Calculator.models.impl.Theme;
import com.Calculator.view.Panel.iMyJPanel;

import javax.swing.*;
import java.awt.*;

public class SetPanel implements iMyJPanel{
    //设置面板
    private JPanel setPanel;

    public SetPanel(Theme theme) {
        //设置面板采用流式布局
        setPanel = new JPanel(new FlowLayout());
        //设置大小
        setPanel.setPreferredSize(new Dimension(theme.getWidth(),theme.getHeight()*6/60));
        //设置边框
//        setPanel.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0));
        //设置背景颜色
        setPanel.setBackground(Color.blue);

        //TODO: 设置组件
    }

    @Override
    public JPanel getJPanel() {
        return setPanel;
    }

    @Override
    public void setJPanel(JPanel jPanel) {
        this.setPanel = jPanel;
    }
}
